{%- set runner_script = salt['pillar.get']('default:OMV_POSTFIX_MASTER_NOTIFICATION_RUNNER', '/usr/share/openmediavault/notification/postfix-runner.sh') -%}
{%- set runner_user = salt['pillar.get']('default:OMV_POSTFIX_MASTER_NOTIFICATION_RUNNER_USER', 'openmediavault-notify') -%}
{%- set smtpd_enabled = salt['pillar.get']('default:OMV_POSTFIX_MASTER_SMTPD_ENABLED', 'yes') -%}
{{ pillar['headers']['multiline'] }}
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
{% if not smtpd_enabled | to_bool %}#{% endif %}smtp      inet  n       -       n       -       -       smtpd
pickup    unix  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
        -o syslog_name=postfix/$service_name
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
postlog   unix-dgram n  -       n       -       1       postlogd
omvnotificationfilter unix  -       n       n       -       -       pipe flags=qX user={{ runner_user }} argv={{ runner_script }} ${sender}
